Skip to content

feat: Implement UseUserAccessGroup for iOS #1750

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

jonsimantov
Copy link
Contributor

Implement the Firebase Authentication method UseUserAccessGroup in the C++ SDK.

This method allows specifying a user access group for keychain data sharing on iOS. It calls the underlying Objective-C method [FIRAuth useUserAccessGroup:error:].

On other platforms (Android, Desktop), this method is a no-op stub, as the functionality is iOS-specific.

Description

Provide details of the change, and generalize the change in the PR title above.


Testing

Describe how you've tested these changes. Link any manually triggered Integration tests or CPP binary SDK Packaging Github Action workflows, if applicable.


Type of Change

Place an x the applicable box:

  • Bug fix. Add the issue # below if applicable.
  • New feature. A non-breaking change which adds functionality.
  • Other, such as a build process or documentation change.

Notes

  • Bug fixes and feature changes require an update to the Release Notes section of release_build_files/readme.md.
  • Read the contribution guidelines CONTRIBUTING.md.
  • Changes to the public API require an internal API review. If you'd like to help us make Firebase APIs better, please propose your change in a feature request so that we can discuss it together.

Implement the Firebase Authentication method UseUserAccessGroup in the C++ SDK.

This method allows specifying a user access group for keychain data sharing on iOS. It calls the underlying Objective-C method `[FIRAuth useUserAccessGroup:error:]`.

On other platforms (Android, Desktop), this method is a no-op stub, as the functionality is iOS-specific.
@@ -373,5 +373,13 @@ AUTH_RESULT_FN(Auth, SignInWithEmailAndPassword, AuthResult)

AUTH_RESULT_FN(Auth, CreateUserWithEmailAndPassword, AuthResult)

#if !FIREBASE_PLATFORM_IOS
// Stub for non-iOS platforms.
void Auth::UseUserAccessGroup(const char* user_access_group) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function isn't necessary in this file, since it's covered in all 3 platform-specific files.

@@ -768,5 +768,13 @@ void IdTokenRefreshThread::DisableAuthRefresh() {
ref_count_--;
}

#if !FIREBASE_PLATFORM_IOS
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for the #if here.

@@ -676,5 +676,13 @@ void DisableTokenAutoRefresh(AuthData* auth_data) {}
void InitializeTokenRefresher(AuthData* auth_data) {}
void DestroyTokenRefresher(AuthData* auth_data) {}

#if !FIREBASE_PLATFORM_IOS
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for the #if.

@@ -608,5 +608,22 @@ void DisableTokenAutoRefresh(AuthData *auth_data) {}
void InitializeTokenRefresher(AuthData *auth_data) {}
void DestroyTokenRefresher(AuthData *auth_data) {}

void Auth::UseUserAccessGroup(const char* user_access_group) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change the method to return AuthError so we can properly handle if any error is returned.

@firebase firebase locked and limited conversation to collaborators Jul 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant